<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
  <title>百度地图离线API V2.0  www.xiaoguo123.com</title>
	<style type="text/css">
  body, html,#map_demo, #tab, #mapfrm {width: 100%;height: 100%;overflow: hidden;margin:0;font-family:"微软雅黑";}
  #menu{height:100%;overflow-y:auto}
  td{font-size:14px}
  h4{margin:0;}
  #map_demo1,#map_demo2{height: 50%}
  </style>
  <script type="text/javascript" src="../../offlinemap/map_load.js"></script>
  <link rel="stylesheet" type="text/css" href="../../offlinemap/css/map.css"/>
  
  <script type="text/javascript" src="../jquery.js"></script>
  <script type="text/javascript" src="../layer/layer.js"></script>
</head>
<body>
<div id="map_demo">1</div>
</body>
</html>
<script type="text/javascript">  
// 百度地图API功能
	var map = new BMap.Map("map_demo");
	var point = new BMap.Point(116.400244,39.92556);
	map.centerAndZoom(point, 8);

	if (document.createElement('canvas').getContext) {
		var  mapStyle ={ 
				features: ["road", "building","water","land"],//隐藏地图上的poi
				style : "dark"  //设置地图风格为高端黑
			}
		//map.setMapStyle(mapStyle);
		var mapType1 = new BMap.MapTypeControl({mapTypes: [BMAP_NORMAL_MAP, BMAP_HYBRID_MAP]}); //地图类型 默认右侧
		map.addControl(mapType1);
		map.setMapType( BMAP_HYBRID_MAP );
		
		var BW            = 0,    //canvas width
			BH            = 0,    //canvas height
			ctx           = null,
			stars         = [],   //存储所有星星对象的数组
			timer         = null, //定时器
			timeLine      = null, //时间轴对象
			rs            = [],   //最新的结果
			isNowTimeData = false, //是否显示当前时间的定位情况
			py            = null, //偏移
			gridWidth     = 10000,//网格的大小
			isOverlay     = false,//是否叠加
			//gridWidth   = 1,//网格的大小
			canvas        = null; //偏移

		function Star(options){
			this.init(options);
		}

		Star.prototype.init = function(options) {
			this.x   = ~~(options.x);
			this.y   = ~~(options.y);
			this.initSize(options.size);
			if (~~(0.5 + Math.random() * 7) == 1) {
				this.size = 0;
			} else {
				this.size = this.maxSize;
			}
		}

		Star.prototype.initSize = function(size) {
			var size = ~~(size);
			this.maxSize = size > 6 ? 6 : size;
		}

		Star.prototype.render = function(i) {
				var p = this;

				if(p.x < 0 || p.y <0 || p.x > BW || p.y > BH) {
					return;
				}

				ctx.beginPath();
				var gradient = ctx.createRadialGradient(p.x, p.y, 0, p.x, p.y, p.size);
				gradient.addColorStop(0, "rgba(7,120,249,1)");
				gradient.addColorStop(1, "rgba(7,120,249,0.3)");
				ctx.fillStyle = gradient;
				ctx.arc(p.x, p.y, p.size, Math.PI*2, false);
				ctx.fill();
				if (~~(0.5 + Math.random() * 7) == 1) {
					p.size = 0;
				} else {
					p.size = p.maxSize;
				}
		}

		function render(){
			renderAction();
			setTimeout(render, 180);
		}

		function renderAction() {
			ctx.clearRect(0, 0, BW, BH);
			ctx.globalCompositeOperation = "lighter";
			for(var i = 0, len = stars.length; i < len; ++i){
				if (stars[i]) {
					stars[i].render(i);
				}
			}
		}


		// 复杂的自定义覆盖物
		function ComplexCustomOverlay(point){
		  this._point = point;
		}
		ComplexCustomOverlay.prototype = new BMap.Overlay();
		ComplexCustomOverlay.prototype.initialize = function(map){
		  this._map = map;
		  canvas = this.canvas = document.createElement("canvas");
		  canvas.style.cssText = "position:absolute;left:0;top:0;";
		  ctx = canvas.getContext("2d");
		  var size = map.getSize();
		  canvas.width = BW = size.width;
		  canvas.height = BH = size.height;
		  map.getPanes().labelPane.appendChild(canvas);
		  //map.getContainer().appendChild(canvas);
		  return this.canvas;
		}
		ComplexCustomOverlay.prototype.draw = function(){
			var map = this._map;
			var bounds = map.getBounds();
			var sw = bounds.getSouthWest();
			var ne = bounds.getNorthEast();
			var pixel = map.pointToOverlayPixel(new BMap.Point(sw.lng, ne.lat));
			py = pixel;
			if (rs.length > 0) {
				showStars(rs);
			}
		}
		var myCompOverlay = new ComplexCustomOverlay(new BMap.Point(116.407845,39.914101));
		map.addOverlay(myCompOverlay);

		var project = map.getMapType().getProjection();
		var bounds = map.getBounds();
		var sw = bounds.getSouthWest();
		var ne = bounds.getNorthEast();
		sw = project.lngLatToPoint(new BMap.Point(sw.lng, sw.lat));
		ne = project.lngLatToPoint(new BMap.Point(ne.lng, ne.lat));

		//左上角墨卡托坐标点
		var original = {
			x : sw.x,
			y : ne.y
		}

		var rs = [[1109,554,7],[830,752,8],[1195,596,2],[1576,123,7],[618,244,2],[921,334,8],[1656,527,7],[855,480,5],[937,595,5],[784,605,1],[814,229,7],[1597,376,6],[1408,754,4],[1569,675,4],[1269,687,6],[1507,192,9],[1361,163,5],[1010,326,1],[1561,540,8],[973,658,5],[1058,794,7],[756,729,1],[1480,543,1],[783,459,8],[1223,185,7],[791,762,8],[726,546,9],[1335,107,3],[1441,718,8],[1227,256,7],[707,547,7],[1492,647,6],[1611,506,2],[1660,623,7],[1513,319,8],[1190,441,8],[1011,521,4],[933,289,4],[1210,124,3],[1080,523,5],[727,591,2],[1466,458,9],[993,401,5],[1217,376,3],[905,256,6],[728,631,1],[1592,193,7],[957,405,9],[1435,793,1],[684,399,6],[1280,480,3],[1480,331,8],[1439,581,3],[937,273,6],[1258,468,8],[823,549,6],[925,480,7],[1691,707,2],[1653,538,2],[1654,592,6],[1220,325,2],[1558,185,5],[1359,719,2],[1635,233,4],[1245,652,9],[1101,794,6],[692,301,2],[1532,295,1],[650,265,6],[860,236,4],[1541,630,6],[618,540,8],[1160,323,7],[1358,282,8],[729,692,6],[679,310,6],[1336,369,9],[1490,262,2],[1499,294,4],[1097,459,6],[1470,358,4],[1096,370,1],[856,726,4],[1590,509,6],[1434,591,5],[1046,642,7],[650,410,2],[1672,276,4],[799,148,6],[1288,464,2],[891,318,5],[1328,633,9],[1358,797,8],[638,727,4],[1305,557,1],[703,141,8],[1532,173,3],[1685,155,6],[993,282,6],[606,720,2],[785,205,5],[1370,668,3],[1279,450,3],[1073,475,2],[1510,224,8],[1619,289,8],[1479,182,9],[727,173,1],[1353,423,3],[955,427,2],[1131,544,3],[1650,334,2],[807,767,6],[1060,368,2],[1199,246,4],[957,194,6],[781,753,7],[721,134,8],[749,614,3],[1063,140,7],[1251,478,4],[1605,446,7],[651,577,7],[1351,170,1],[1540,551,3],[823,779,4],[1505,194,4],[1217,272,4],[1044,367,2],[1379,661,2],[1128,375,7],[1576,314,3],[1292,347,9],[957,125,1],[1043,722,6],[1360,164,6],[724,740,7],[1118,433,1],[1566,716,4],[621,511,2],[841,147,6],[1657,768,9],[814,508,3],[724,735,3],[744,317,2],[1476,100,3],[1073,180,2],[820,509,6],[838,424,5],[1276,438,2],[1496,591,2],[1048,564,2],[939,700,7],[1218,779,6],[1537,171,9],[634,728,9],[933,329,1],[1139,470,6],[768,621,2],[1366,351,6],[1510,221,3],[629,506,9],[798,722,8],[1609,415,8],[1219,312,9],[1170,334,8],[1123,546,2],[1202,189,6],[825,296,4],[958,783,7],[1622,662,9],[859,681,5],[825,107,4],[635,749,8],[1514,443,2],[1405,106,5],[1184,438,2],[1324,122,3],[946,265,5],[1387,493,5],[1124,443,3],[1051,608,2],[1618,751,2],[963,774,1],[804,656,6],[979,468,6],[1523,140,1],[1667,600,1],[851,120,4],[1444,621,9],[910,255,4],[1261,542,2],[1426,490,1],[1601,721,1],[1697,151,8],[1232,392,3],[776,280,4],[853,258,1],[965,418,2],[1337,255,8],[1227,453,1],[1656,174,7],[683,699,3],[735,636,2],[746,633,3],[1633,335,7],[898,447,9],[1327,608,2],[1442,140,6],[1591,609,8],[1459,308,4],[1571,280,4],[1279,333,3],[1600,419,1],[696,512,8],[974,469,2],[611,659,6],[1633,421,4],[703,257,5],[1375,187,2],[1191,733,5],[1562,651,7],[949,383,1],[1278,319,5],[1349,380,1],[1159,618,6],[1340,625,4],[967,582,9],[1394,648,2],[784,441,3],[976,118,2],[1497,730,9],[1200,252,4],[1270,683,6],[741,460,1],[860,115,8],[1561,586,5],[941,120,3],[826,625,1],[959,743,5],[1230,282,5],[1396,153,4],[1329,535,6],[607,261,5],[1331,350,1],[1395,516,1],[1172,428,7],[676,645,7],[938,789,5],[963,317,4],[1526,718,7],[1016,525,7],[1497,289,4],[1117,294,6],[1653,759,9],[1655,564,6],[1682,229,1],[1374,277,8],[1099,492,8],[1650,724,1],[1011,613,9],[659,178,6],[1491,749,8],[806,378,2],[1476,348,1],[1439,319,7],[957,307,9],[990,100,2],[780,418,7],[1655,386,6],[670,647,4],[658,685,5],[1315,552,4],[1169,683,8],[1328,540,2],[1423,374,5],[1148,601,7],[1077,150,7],[1284,265,3],[1008,235,6],[613,280,4],[1026,318,3],[1561,773,9],[916,435,7],[708,198,4],[891,721,7],[1418,370,5],[1172,673,5],[927,409,8],[1181,669,9],[785,678,3],[1250,249,5],[1534,160,5],[1429,362,9],[1140,431,2],[1545,616,1],[1281,437,4],[705,101,3],[1310,309,6],[1072,679,5],[1049,797,3],[1310,510,5],[813,405,6],[1375,232,9],[1363,575,5],[1505,476,2],[1524,210,7],[868,277,7],[1114,728,9],[745,329,8],[1272,615,8],[1607,367,4],[1076,503,8],[640,296,1],[616,781,7],[1114,657,3],[1323,545,4],[961,716,6],[601,343,5],[1672,435,8],[1451,163,6],[1225,104,9],[1646,407,5],[1446,433,8],[1454,443,8],[1109,770,6],[1357,530,3],[677,760,2],[1377,761,5],[863,743,9],[711,584,1],[1368,282,1],[1345,247,5],[855,786,9],[674,629,5],[1565,253,4],[1131,735,1],[1399,784,9],[1534,578,9],[951,746,8],[897,117,5],[942,605,8],[995,380,9],[1531,542,9],[1490,590,7],[888,503,9],[1342,142,8],[1372,650,8],[1340,544,5],[1249,767,5],[1068,256,5],[1649,474,2],[1416,726,6],[1415,618,3],[1393,484,9],[1102,667,5],[1052,439,6],[901,231,4],[725,702,9],[1301,414,9],[693,712,2],[1212,679,7],[1425,498,6],[979,317,4],[1228,121,8],[1148,441,7],[602,729,2],[1223,221,4],[1609,300,3],[1592,746,7],[1525,106,5],[604,495,4],[1373,320,9],[925,561,3],[1292,261,3],[1162,610,8],[825,611,7],[1022,308,8],[1425,250,2],[1674,181,1],[1318,769,1],[824,772,6],[1242,564,9],[1186,771,6],[1473,511,8],[693,169,6],[1551,312,3],[1197,581,6],[1034,406,8],[1186,389,9],[1254,146,8],[1333,289,8],[932,697,5],[877,370,5],[1549,226,1],[1373,285,2],[899,190,5],[1229,570,2],[786,146,6],[1681,519,9],[1602,235,1],[1475,701,4],[1306,212,2],[766,389,6],[1281,292,7],[1344,784,1],[1515,274,2],[921,675,8],[1084,794,8],[627,781,5],[626,718,7],[698,575,5],[1067,324,7],[1275,430,2],[808,163,4],[1641,636,4],[1664,519,6],[729,723,4],[1634,331,4],[1511,349,4],[946,366,3],[1696,428,9],[1190,725,3],[861,455,7],[987,588,8],[1418,550,6],[723,527,2],[1404,609,1],[788,567,4],[1264,447,8],[609,667,2],[928,664,6],[894,339,5],[1213,505,1],[951,752,7],[790,572,4],[1472,650,1],[613,462,7],[734,581,4],[1219,304,9],[995,310,7],[1189,519,5],[800,706,8],[1394,396,4],[1448,620,4],[1169,741,1],[1598,596,8],[1599,604,4],[1301,689,1],[636,383,3],[1619,634,6],[1293,309,3],[753,436,1],[1692,242,5],[1067,781,3],[1468,443,2],[1512,378,8],[1320,313,6],[1699,759,5],[634,783,8],[991,731,6],[1678,471,9],[823,569,4],[922,564,6],[1488,161,6],[670,713,1],[861,593,5],[732,351,7],[1396,350,7],[786,372,7],[622,621,6],[1298,606,2],[1204,749,8],[1639,254,5],[1197,118,5],[726,163,4],[795,330,2],[1302,414,5],[1044,221,8],[723,339,3],[1475,353,9],[1019,797,7],[1147,482,6],[913,443,8],[1410,122,8],[901,203,9],[1358,328,3],[1489,774,7],[915,357,9],[735,435,3],[984,292,6],[952,558,6],[616,207,2],[1300,406,6],[1126,221,7],[982,413,8],[938,196,2],[1256,761,2],[969,262,5],[871,348,9],[1151,593,3],[728,117,9],[1403,127,1],[1578,573,5],[1191,208,6],[840,451,1],[653,666,3],[823,384,2],[955,619,4],[1491,792,8],[1455,442,5],[620,524,5],[1608,335,5],[1663,257,3],[1100,633,4],[729,786,8],[851,120,7],[1124,262,1],[1337,488,8],[704,355,8],[1563,199,3],[997,212,9],[1559,153,3],[1064,129,5],[1313,447,3],[631,529,3],[1604,689,3],[1265,322,5],[1373,791,1],[1197,158,4],[1009,770,5],[1359,323,7],[1276,233,8],[1563,528,8],[996,281,3],[1269,302,9],[1521,240,8],[703,663,1],[1243,455,1],[1294,135,2],[645,396,2],[1253,178,5],[937,609,6],[704,521,3],[1618,774,5],[877,499,8],[813,385,1],[1675,451,8],[687,160,3],[786,601,4],[976,630,8],[1121,346,9],[1617,560,6],[1221,626,3],[1500,574,2],[963,751,7],[745,186,2],[748,170,7],[1637,226,7],[884,344,5],[1288,584,3],[1056,215,6],[949,162,3],[1643,558,9],[797,430,7],[1012,661,6],[755,754,7],[946,148,8],[1689,108,1],[1426,289,4],[852,727,1],[1113,317,2],[659,539,3],[931,502,9],[929,628,4],[1674,191,3],[1242,289,2],[946,509,3],[761,502,3],[775,328,5],[1173,488,4],[1233,115,7],[1475,153,4],[714,363,9],[674,573,7],[1155,556,8],[1418,265,1],[1609,485,7],[777,588,3],[1059,699,6],[1639,364,2],[1004,767,2],[710,623,3],[1108,696,6],[1039,743,3],[701,396,9],[1606,217,2],[608,159,7],[1355,272,4],[1634,564,3],[1170,525,6],[1318,782,6],[1489,153,4],[644,476,2],[1314,756,2],[1627,120,5],[1559,760,7],[649,765,8],[1446,546,1],[808,503,7],[1114,166,3],[734,622,3],[1404,488,4],[695,516,9],[923,270,8],[1063,224,8],[1671,134,8],[1361,165,7],[1144,703,4],[1199,136,9],[882,463,1],[1236,548,8],[1562,360,4],[871,420,9],[773,626,3],[606,221,4],[1573,202,5],[1377,686,5],[1127,333,4],[1578,713,5],[1563,193,9],[1653,598,6],[1463,510,9],[784,682,5],[760,793,2],[1006,797,4],[1446,716,5],[840,510,4],[1438,145,7],[782,767,6],[1284,680,7],[1256,649,4],[834,498,9],[821,616,8],[1312,718,8],[1531,276,8],[840,114,7],[1411,267,3],[703,100,4],[1462,216,3],[986,652,2],[656,369,9],[1111,518,5],[1109,659,3],[924,412,1],[727,304,4],[1627,457,4],[1294,272,6],[1606,338,6],[888,187,8],[1220,432,6],[1364,468,9],[1271,793,6],[704,418,4],[949,624,8],[1066,705,1],[1460,658,6],[776,400,8],[1458,340,2],[1039,523,3],[805,218,8],[1439,704,3],[1397,431,3],[912,497,7],[1307,720,5],[1093,316,4],[1200,163,2],[768,275,6],[608,121,9],[823,400,6],[1175,531,7],[949,365,6],[1303,172,1],[1647,370,6],[1391,120,5],[858,434,8],[1278,116,9],[1475,223,2],[1043,229,2],[989,371,6],[1602,737,3],[1300,259,6],[848,706,7],[917,672,2],[1612,476,2],[1080,640,6],[888,371,6],[796,228,8],[980,510,1],[1197,758,4],[786,695,3],[1053,440,5],[637,598,4],[1434,100,2],[1557,744,7],[612,349,5],[1293,533,9],[900,658,1],[702,199,7],[707,579,6],[1139,698,5],[1473,286,9],[957,310,7],[1394,141,7],[1632,749,6],[1361,757,9],[838,498,6],[744,689,4],[851,754,5],[1604,122,2],[1191,465,1],[613,320,3],[1672,547,6],[1314,353,7],[956,310,6],[1613,794,5],[1560,245,2],[1088,337,9],[1493,497,9],[955,436,9],[1171,112,5],[1228,120,7],[1578,102,4],[1158,556,7],[802,783,1],[1469,727,1],[968,638,3],[1095,249,6],[1047,117,2],[928,343,6],[845,707,7],[1336,406,7],[1075,328,7],[1518,683,4],[1258,112,4],[1329,665,3],[1390,200,1],[1681,514,2],[1245,799,3],[1434,308,6],[1052,464,5],[689,232,9],[1461,534,2],[1136,418,1],[1529,137,1],[796,600,8],[1051,403,1],[1051,391,6],[1287,101,6],[1549,632,9],[1093,219,4],[1592,277,6],[1473,124,3],[612,465,7],[669,357,7],[746,482,5],[612,769,9],[636,356,3],[1311,793,3],[886,697,1],[787,311,3],[1262,242,5],[844,797,5],[1110,105,1],[776,150,4],[1601,243,9],[1012,251,9],[900,274,3],[1246,727,3],[1595,208,2],[1680,328,4],[852,749,6],[1404,204,6],[894,529,6],[959,641,7],[1429,578,9],[1400,140,2],[1323,331,4],[1649,742,3],[864,675,5],[1019,662,7],[1506,123,7],[1116,634,8],[722,121,5],[1439,350,3],[1133,177,9],[1053,686,9],[1211,446,3],[1644,414,3],[861,582,1],[1351,149,8],[1098,725,8],[767,353,6],[600,432,7],[1108,265,1],[1368,605,2],[1279,193,9],[1253,582,5],[1593,546,9],[741,713,6],[795,490,7],[633,107,6],[1609,213,9],[1223,214,4],[871,537,6],[913,326,4],[1078,758,5],[1065,473,2],[1598,405,8],[1523,495,7],[1106,619,3],[767,640,3],[1412,582,5],[1356,278,6],[720,451,3],[1447,651,6],[765,255,5],[1332,551,1],[1557,486,5],[1383,373,1],[1072,695,8],[1375,102,5],[1691,618,3],[1085,399,5],[659,476,9],[921,315,8],[1539,420,1],[990,186,6],[1030,794,2],[1550,592,6],[1590,192,5],[1347,686,5],[853,680,2],[1119,288,6],[1666,326,2],[1665,530,5],[1430,427,9],[1439,676,1],[1058,249,1],[1284,153,7],[839,783,8],[1331,558,7],[724,719,5],[934,349,8],[1615,327,2],[686,304,7],[1197,132,2],[1110,666,1],[1160,258,3],[1201,693,3],[916,146,3],[778,610,9],[1561,690,8],[1056,202,2],[847,148,5],[995,203,8],[719,583,8],[958,207,7],[1002,564,9],[1282,246,7],[1646,448,8],[882,561,5],[840,473,4],[671,763,5],[896,220,6],[1478,472,7],[1282,547,5],[1137,776,6],[783,332,3],[677,766,5],[1505,731,9],[1305,210,6],[808,363,2],[1238,408,1],[730,597,3],[1399,455,8],[1130,189,5],[1621,531,4],[1181,648,7],[1471,697,7],[891,573,6],[858,322,7],[1551,454,2],[629,161,6],[750,244,3],[1061,752,8],[856,389,9],[1356,339,5],[718,709,3],[1545,563,2],[1219,748,8],[783,212,2],[1624,117,7],[676,136,7],[1316,231,9],[1637,525,9],[1417,688,3],[1338,469,7],[837,545,5],[1199,446,2],[1401,140,2],[1247,256,3],[1443,208,3],[1097,257,4],[847,712,5],[823,672,2],[726,492,9],[1084,261,5],[717,412,2],[1309,793,6],[1528,602,7],[1667,314,9],[881,150,1],[1224,466,3],[1624,624,2],[1130,766,1],[1305,146,6],[1305,454,8],[786,529,3],[967,280,3],[1692,171,9],[1380,149,3],[1315,328,4],[1420,725,8],[671,676,6],[886,313,6],[900,762,6],[1531,510,2],[1315,628,7],[1590,162,1],[753,156,1],[707,653,2],[999,408,5],[1370,229,4],[1217,275,2],[787,457,5],[1406,648,5],[997,540,1],[1146,295,8],[868,225,9],[875,322,9],[993,391,7],[1189,645,2],[643,434,4],[1081,127,6],[1325,246,2],[804,759,9],[1325,312,6],[1390,659,8],[1186,130,1],[1079,305,4],[1063,555,7],[815,229,5],[1053,257,1],[1495,563,1],[1112,325,3],[1291,455,2],[1232,216,5],[765,719,3],[606,391,4],[644,696,6],[1032,291,3],[777,428,5],[1380,716,7],[1409,585,4],[1480,211,7],[682,650,2],[922,352,4],[1495,458,3],[747,462,7],[1147,490,5],[770,765,8],[1108,178,3],[1651,675,2],[1340,489,8],[658,349,1],[1431,402,8],[1662,606,2],[975,476,7],[1262,569,2],[907,218,7],[1490,326,7],[1274,649,8],[1574,618,6],[642,389,2],[1575,426,5],[1583,255,9],[1356,231,7],[1527,469,3],[1160,191,9],[1316,493,1],[1295,477,4],[1270,527,2],[1335,517,9],[1305,521,4],[1320,511,8],[1283,503,1],[1281,477,2],[1337,465,7],[1275,506,8],[1267,481,3],[1273,516,5],[1305,527,3],[1320,521,1],[1314,486,8],[1260,465,4],[1325,489,9],[1327,510,2],[1263,506,3],[1323,522,8],[1313,529,1],[1336,462,8],[1295,508,6],[1322,488,4],[1326,461,7],[1309,462,8],[1264,528,2],[1262,515,7],[1278,519,4],[1299,502,1],[1285,474,9],[1292,469,1],[1275,505,6],[1326,486,9],[1276,471,9],[1334,521,1],[1317,525,8],[1329,528,5],[1310,465,3],[1338,504,8],[1266,529,9],[1264,481,1],[1264,497,6],[1313,482,9],[1309,499,1],[1308,492,8],[1308,468,7],[1296,538,5],[1340,507,6],[1280,504,2],[1262,510,1],[1340,514,3],[1266,519,7],[1318,492,1],[1315,460,5],[1324,509,9],[1313,476,1],[1287,513,9],[1330,513,6],[1297,533,1],[1309,536,7],[1309,536,4],[1331,461,2],[1309,520,5],[1310,494,6],[1269,477,2],[1260,531,4],[1261,478,1],[1340,467,7],[1304,505,6],[1313,473,5],[1291,523,5],[1325,513,5],[1337,482,3],[1301,533,7],[1265,461,9],[1278,462,8],[1309,463,1],[1312,462,1],[1287,507,6],[1337,479,8],[1301,511,6],[1260,495,3],[1303,492,5],[1324,533,5],[1299,539,5],[1292,477,5],[1275,526,5],[1276,497,6],[1284,525,2],[1337,521,4],[1323,482,1],[1291,482,5],[1313,525,8],[1277,509,8],[1314,467,7],[1271,499,9],[1311,514,8],[1274,531,3],[1320,474,1],[1332,471,8],[1283,534,2],[1285,485,4],[1322,539,2],[1311,475,8],[1294,530,9],[1274,460,4],[1272,512,1],[1337,526,9],[1277,505,2],[1283,497,3],[1271,521,2],[1280,465,5],[1312,527,5],[1329,498,7],[1314,532,6],[1306,466,6],[1339,479,2],[1264,475,1],[1261,492,6],[1272,516,1],[1294,527,8],[1310,467,8],[1270,520,7],[1310,508,2],[1285,481,1],[1330,528,2],[1294,526,4],[1311,531,6],[1314,533,9],[1281,464,7],[1287,498,5],[1272,468,6],[1262,478,4],[1320,529,9],[1336,473,3],[1262,462,1],[1276,497,9],[1308,468,8],[1275,523,7],[1275,464,7],[1332,491,3],[1294,503,4],[1264,505,6],[1295,485,4],[1292,480,6],[1312,482,6],[1319,498,1],[1312,466,2],[1296,482,9],[1271,497,1],[1332,488,4],[1270,523,9],[1297,528,5],[1262,482,8],[1296,515,1],[1263,486,4],[1314,465,8],[1321,518,9],[1337,473,2],[1335,485,6],[1337,477,1],[1289,487,8],[1284,525,6],[1325,528,9],[1310,484,6],[1316,488,9],[1263,461,1],[1330,523,7],[1323,519,9],[1338,513,2],[1309,510,4],[1310,539,7],[1294,483,6],[1264,467,4],[1338,518,7],[1306,493,1],[1300,497,1],[1301,487,8],[1278,469,6],[1269,466,3],[1286,516,8],[1320,485,8],[1300,519,2],[1266,524,3],[1300,522,9],[1277,487,4],[1282,528,8],[1288,488,2],[1277,507,3],[1325,517,4],[1265,462,1],[1337,522,4],[1326,482,2],[1339,489,9],[1278,529,7],[1276,465,1],[1308,487,9],[1296,516,3],[1312,533,8],[1336,518,5],[1286,524,6],[1292,520,4],[1324,506,6],[1334,504,9],[1328,523,8],[1304,539,9],[1308,507,3],[1299,463,9],[1319,515,8],[1306,511,6],[1269,537,4],[1316,489,2],[1264,472,7],[1315,466,3],[1315,535,1],[1302,498,1],[1296,466,6],[1317,505,6],[1313,484,3],[1302,531,9],[1268,460,9],[1299,517,3],[1309,521,4],[1285,496,5],[1306,470,5],[1309,513,9],[1311,468,1],[1280,525,6],[1332,497,8],[1278,539,7],[1275,467,7],[1269,506,5],[1292,474,3],[1328,500,7],[1289,465,8],[1325,515,5],[1319,486,5],[1319,506,4],[1284,497,8],[1274,516,8],[1335,532,9],[1316,460,5],[1273,493,6],[1291,480,2],[1265,509,2],[1329,494,9],[1285,472,3],[1330,532,8],[1278,475,3],[1264,489,9],[1329,484,8],[1320,540,8],[1277,472,3],[1329,504,5],[1260,509,2],[1278,497,6],[1270,523,7],[1288,512,6],[1271,530,8],[1292,534,2],[1289,523,5],[1277,502,5],[1266,520,6],[1289,509,2],[1331,509,7],[1262,528,3],[1308,538,1],[1286,486,7],[1337,497,5],[1322,530,5],[1336,479,3],[1294,497,7],[1333,504,5],[1303,533,2],[1316,524,7],[1298,526,6],[1318,494,6],[1319,521,8],[1293,517,4],[1336,498,3],[1293,494,5],[1313,529,9],[1295,521,5],[1337,483,4],[1266,540,2],[1327,498,9],[1293,475,4],[1339,535,2],[1329,487,9],[1277,483,4],[1295,516,8],[1332,489,6],[1326,524,4],[1284,521,7],[1314,528,7],[1327,514,2],[1326,467,4],[1278,465,3],[1293,535,6],[1284,471,9],[1314,506,6],[1297,498,9],[1268,484,7],[1302,508,5],[1278,481,4],[1334,468,1],[1266,534,2],[1295,472,2],[1318,505,2],[1287,529,3],[1280,503,8],[1330,540,3],[1328,468,6],[1309,510,3],[1271,528,5],[1301,521,6],[1303,528,5],[1314,482,6],[1329,460,3],[1339,488,1],[1280,508,6],[1267,498,6],[1292,485,7],[1262,535,4],[1280,465,2],[1320,506,9],[1287,469,8],[1328,523,1],[1301,512,1],[1320,511,4],[1327,531,1],[1297,538,5],[1266,490,8],[1325,492,7],[1272,512,8],[1287,492,4],[1284,519,5],[1268,507,3],[1275,468,9],[1282,528,6],[1317,515,5],[1320,472,5],[1281,478,8],[1267,462,3],[1328,474,9],[1314,502,3],[1266,526,1],[1308,534,6],[1334,469,7],[1331,491,5],[1299,468,3],[1338,529,4],[1294,469,6],[1281,476,6],[1300,464,8],[1291,518,4],[1315,525,2],[1317,492,1],[1285,486,2],[1261,476,6],[1305,515,7],[1324,513,6],[1274,467,7],[1324,488,8],[1296,528,9],[1282,479,7],[1311,534,5],[1326,511,8],[1334,536,2],[1271,537,4],[1320,502,1],[1297,485,7],[1261,500,8],[1317,484,2],[1308,521,1],[1303,463,3],[1276,514,2],[1314,499,8],[1304,493,8],[1321,504,7],[1273,484,3],[1281,521,6],[1262,523,1],[1330,499,4],[1265,466,2],[1269,510,2],[1292,526,8],[1309,500,4],[1297,464,7],[1279,525,3],[1339,539,6],[1279,479,4],[1325,481,2],[1332,471,6],[1283,476,7],[1295,486,4],[1310,518,2],[1299,487,7],[1328,524,7],[1309,462,5],[1335,461,5],[1305,480,7],[1336,465,1],[1269,537,2],[1322,480,4],[1301,515,7],[1330,484,4],[1264,524,7],[1319,511,5],[1298,479,6],[1261,474,6],[1303,520,8],[1283,516,9],[1286,525,8],[1300,506,2],[1330,467,8],[1306,538,2],[1260,461,9],[1321,521,5],[1285,478,8],[1333,479,9],[1301,522,7],[1289,465,4],[1283,491,2],[1273,531,8],[1284,521,9],[1270,487,8],[1280,487,8],[1273,468,6],[1318,493,8],[1301,486,2],[1300,527,9],[1277,476,9],[1310,499,4],[1328,513,3],[1312,538,1],[1304,468,4],[1292,488,7],[1283,502,8],[1335,480,2],[1325,522,5],[1335,481,4],[1327,498,6],[1325,468,1],[1273,537,7],[1293,509,7],[1294,472,8],[1322,505,2],[1297,529,7],[1280,524,9],[1296,508,7],[1339,503,9],[1287,490,4],[1333,474,5],[1337,487,5],[1314,521,1],[1289,474,3],[1273,537,8],[1285,494,7],[1339,514,5],[1333,470,1],[1308,469,6],[1304,496,9],[1339,488,2],[1301,485,5],[1261,540,3],[1269,489,4],[1290,502,4],[1276,527,8],[1331,525,5],[1289,518,6],[1294,485,7],[1263,530,2],[1262,528,6],[1274,489,8],[1315,490,8],[1335,499,2],[1290,530,7],[1322,466,6],[1308,538,4],[1268,486,1],[1320,521,4],[1299,524,3],[1316,527,2],[1280,460,5],[1269,516,8],[1339,511,4],[1275,460,3],[1335,523,3],[1300,491,3],[1331,500,6],[1340,479,4],[1293,519,2],[1316,494,9],[1326,515,1],[1285,524,7],[1275,523,4],[1304,538,4],[1323,533,2]];
		showStars(rs);
		//显示星星
		function showStars(rs) {
			stars.length = 0;
			var temp = {};
			for (var i = 0, len = rs.length; i < len; i++) {
				var item = rs[i];
				var addNum = gridWidth / 2;
				var x = item[0] * gridWidth + addNum;
				var y = item[1] * gridWidth + addNum;
				var point = project.pointToLngLat(new BMap.Pixel(x, y));
				var px = map.pointToOverlayPixel(point);
					//create all stars
					var s = new Star({
						x: px.x - py.x, 
						y: px.y - py.y,
						size: item[2]
					});
					stars.push(s);
				//}
			}
			canvas.style.left = py.x + "px";
			canvas.style.top = py.y + "px";
			renderAction();
		}

		render();

		function nowTimeCbk (time) {
			/*
			requestMgr.request(time, function(){
				if (isNowTimeData) {
					setTimeout(function(){
						if (isNowTimeData) {
							startCbk(nowTimeCbk);
						}
					}, 1000);
				}
			});
			*/
		}
		function startCbk(cbk){
			var now = new Date();
			var time = {
				hour   : now.getHours(),
				minute : now.getMinutes(),
				second : now.getSeconds()
			};
			if (cbk) {
				cbk(time);
			}
		};
		startCbk(nowTimeCbk);
	} else {
		alert('请在chrome、safari、IE8+以上浏览器查看本示例');
	}
</script>